package com.chzc;

import com.chzc.dao.StudentDao;
import com.chzc.db.StudentDB;
import com.chzc.pojo.Student;

import java.util.ArrayList;
import java.util.Scanner;

/**
 * @author CV大魔王
 * @Description
 * @date 2021/3/14 20:01
 */
public class RunApp {

    public static void main(String[] args) {
        StudentDB.initStudent();

        StudentDao studentDao = new StudentDao();
        Scanner scString = new Scanner(System.in);
        System.out.print("账号：");
        String username = scString.next();
        System.out.print("密码：");
        String pwd = scString.next();
        Student student = studentDao.login(username, pwd);
        if (student == null){
            System.out.println("登录失败");
        }else {
            System.out.println("登录成功");
        }
    }
}
